package net.gdface.face;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import net.gdface.face.Entity.fl_device;
import net.gdface.face.Entity.fl_face;
import net.gdface.face.Entity.fl_log;
import net.gdface.face.Entity.fl_person;

import net.gdface.face.fl_deviceDao;
import net.gdface.face.fl_faceDao;
import net.gdface.face.fl_logDao;
import net.gdface.face.fl_personDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig fl_deviceDaoConfig;
    private final DaoConfig fl_faceDaoConfig;
    private final DaoConfig fl_logDaoConfig;
    private final DaoConfig fl_personDaoConfig;

    private final fl_deviceDao fl_deviceDao;
    private final fl_faceDao fl_faceDao;
    private final fl_logDao fl_logDao;
    private final fl_personDao fl_personDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        fl_deviceDaoConfig = daoConfigMap.get(fl_deviceDao.class).clone();
        fl_deviceDaoConfig.initIdentityScope(type);

        fl_faceDaoConfig = daoConfigMap.get(fl_faceDao.class).clone();
        fl_faceDaoConfig.initIdentityScope(type);

        fl_logDaoConfig = daoConfigMap.get(fl_logDao.class).clone();
        fl_logDaoConfig.initIdentityScope(type);

        fl_personDaoConfig = daoConfigMap.get(fl_personDao.class).clone();
        fl_personDaoConfig.initIdentityScope(type);

        fl_deviceDao = new fl_deviceDao(fl_deviceDaoConfig, this);
        fl_faceDao = new fl_faceDao(fl_faceDaoConfig, this);
        fl_logDao = new fl_logDao(fl_logDaoConfig, this);
        fl_personDao = new fl_personDao(fl_personDaoConfig, this);

        registerDao(fl_device.class, fl_deviceDao);
        registerDao(fl_face.class, fl_faceDao);
        registerDao(fl_log.class, fl_logDao);
        registerDao(fl_person.class, fl_personDao);
    }
    
    public void clear() {
        fl_deviceDaoConfig.clearIdentityScope();
        fl_faceDaoConfig.clearIdentityScope();
        fl_logDaoConfig.clearIdentityScope();
        fl_personDaoConfig.clearIdentityScope();
    }

    public fl_deviceDao getFl_deviceDao() {
        return fl_deviceDao;
    }

    public fl_faceDao getFl_faceDao() {
        return fl_faceDao;
    }

    public fl_logDao getFl_logDao() {
        return fl_logDao;
    }

    public fl_personDao getFl_personDao() {
        return fl_personDao;
    }

}
